package xjtu;

import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.BeforeEach;
class CalculatorTest extends CalculatorParameterizedTest {

    private Calculator c;
    @BeforeEach
    void setUp() {
        c=new Calculator();
        System.out.println("Before each");
    }

    @Test
    void add() {
        assertEquals(8,c.add(3, 5));
        assertEquals(30,c.add(10, 20));
        System.out.println("Test add");
    }
    @Test
    void add2() {
        assertEquals(0,c.add(0, 0));
        System.out.println("Test add2");
    }
    @Test
    void add3() {
        assertEquals(-10,c.add(10, -20));
        System.out.println("Test add3");
    }

    @Test
    void div() {
        assertEquals(2,c.div(6, 3));
        System.out.println("Test div");
    }

    @Test
    void mul() {
        assertEquals(15,c.mul(3, 5));
        System.out.println("Test mul");
    }

    @Test
    void sub() {
        assertEquals(3,c.sub(8, 5));
        assertEquals(-10,c.sub(10, 20));
        assertEquals(10,c.sub(20, 10));
        assertEquals(-20,c.sub(0, 20));
        System.out.println("Test sub");
    }

    @Test
    void testAdd() {
    }

    @Test
    void testDiv() {
    }

    @Test
    void testMul() {
    }

    @Test
    void testSub() {
    }
}
